package com.atguigu.gulimall.product.feign.fallback;

import com.atguigu.common.exception.BizCodeEnume;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author 小坏
 * @Date 2021/3/8 15:18
 * @Version 1.0
 * @program: 父工程 gulimall 万物起源之地
 * @Component 当成组件
 */
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info ("熔断方法调用。。。。。");
        return R.error (BizCodeEnume.TO_MANY_REQUEST.getCode (), BizCodeEnume.TO_MANY_REQUEST.getMsg ());
    }
}
